#ifndef _APPMANAGER_H_
#define _APPMANAGER_H_

#include "defines.h"
#include "console.h"

#include "Camera.h"
#include "input.h"

#include "JPhysicsManager.h"
#include "timer.h"

class GLUquadric;
class glText;
class glWindow;

class appManager
{
public:

	appManager();

	void init(HWND hwnd);  
	void update(int frameRate, HWND hwnd);
	void render();
	void release();  

	glWindow* getGlWindow() {return m_glWindow;}
	Input*    getInput()    {return &m_input;}

private: 

	void updateCamera();
	bool animateNextFrame(int desiredFrameRate); 

	GLUquadric		*m_quadratic;

	glWindow		*m_glWindow;
	glText			*m_glText;

	Camera			m_camera;
	Input			m_input;

	CStopWatch		m_frameTimer;
	double			m_frameTime;

	int				m_frameCounter;
};

#endif // _APPMANAGER_H_